home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Games #12
/
GEGA012.iso
/
Jogos de Azar
/
fruit.swf
/
scripts
/
C_LinesReelsButtonsCLASS.as
< prev
next >
Wrap
Text File
|
2006-01-17
|
2KB
|
81 lines
_global.C_LinesReelsButtonsCLASS = function()
{
};
C_LinesReelsButtonsCLASS.prototype = new MovieClip();
C_LinesReelsButtonsCLASS.prototype.onLoad = function()
{
if(!this.pos)
{
this.pos = 1;
}
this.setPos(this.pos);
var b;
var i = 1;
while(i <= 5)
{
b = this["l" + i + "_btn"];
b.n = i;
b.addAlt();
b.onPress = function()
{
this._parent.setPos(this.n);
this._parent.doOut();
};
b.onRollOver = function()
{
var o = this._parent;
var h = o.hints[this.n];
o.doOver();
if(h != undefined)
{
o.showAlt(h);
}
};
b.onDragOut = b.onRollOut = function()
{
this._parent.doOut();
this._parent.hideAlt();
};
i++;
}
var o = {};
o[1] = "Bet on ONE payline";
o[2] = "Bet on TWO paylines";
o[3] = "Bet on TREE paylines";
o[4] = "Bet on FOUR paylines";
o[5] = "Bet on FIVE paylines";
this.setHints(o);
};
C_LinesReelsButtonsCLASS.prototype.setPos = function(pos)
{
var i = 1;
while(i <= 5)
{
delete this["l" + i + "_btn"].enabled;
this["l" + i + "_btn"]._brightness = -50;
this["l" + i + "_mc"]._brightness = -50;
i++;
}
i = pos;
this["l" + i + "_btn"].enabled = false;
this["l" + i + "_btn"]._brightness = 0;
this["l" + i + "_mc"]._brightness = 0;
this.pos = pos;
this.client.client[this.client.handler](this.pos);
};
C_LinesReelsButtonsCLASS.prototype.setHints = function(h)
{
this.hints = h;
};
C_LinesReelsButtonsCLASS.prototype.addProperty("line",function()
{
return this.pos;
}
,C_LinesReelsButtonsCLASS.prototype.setPos);
C_LinesReelsButtonsCLASS.prototype.setChangeHandler = function(client, handler)
{
this.client = {client:client,handler:handler};
};
ASSetPropFlags(_global,"C_LinesReelsButtonsCLASS",131);
Object.registerClass("C_LinesReelsButtonsCLASS",C_LinesReelsButtonsCLASS);